export function get(key) {
  return JSON.parse(localStorage.getItem(key))
}
export function set(key, value) {
    if (value === undefined) return
    if (value === null) return localStorage.removeItem(key)
    localStorage.setItem(key, JSON.stringify(value))
}

export function clear() {
  localStorage.clear()
}

export function remove(key){
  let list = get(key)
  if (list) {
      return localStorage.removeItem(key)
  }
}